//
//  UIImage+extension.swift
//  Weibo(Swift)
//
//  Created by 阳 on 16/7/12.
//  Copyright © 2016年 阳. All rights reserved.
//

import UIKit

extension UIImage {
    class func sampleImage(size :CGSize = CGSizeMake(1, 1),color : UIColor? = UIColor.whiteColor())->UIImage
   {
        UIGraphicsBeginImageContextWithOptions(size, false, screenScale)
        color!.setFill()
        UIRectFill(CGRect(origin: CGPointZero, size: size))
        let image = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return image
    }
}
